﻿// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : PhotonServerProject | PhotonServerFramework | IClientPeer.cs
// //  Created : 2016 - 03 - 21 09:53
// //  Modified: 2016 - 04 - 18 09:38
// //  ********************************************************************************

using System;
using ExitGames.Logging;
using PhotonServerFramework.Interfaces.Configuration;

namespace PhotonServerFramework.Interfaces.Client
{
    /// <summary>
    ///     Interface for the client peers (connecting clients from outside)
    /// </summary>
    public interface IClientPeer
    {
        /// <summary>
        ///     Logger instance
        /// </summary>
        ILogger Logger { get; }

        /// <summary>
        ///     Unique peer id
        /// </summary>
        Guid ClientPeerId { get; }

        /// <summary>
        ///     Client configuration (mainly filled by <see cref="P:Photon.SocketServer.PeerBase" />)
        /// </summary>
        IPeerData ClientPeerData { get; }

        /// <summary>
        ///     Everything we need at connect time goes in here
        /// </summary>
        void Connect();

        /// <summary>
        ///     Called by the owning server application on shut down
        /// </summary>
        /// <param name="server">name of the owning server application</param>
        void Disconnect(string server);
    }
}
